package com.ktjy.example.example20To25.service.impl;


import com.ktjy.example.example20To25.dao.PetDao;
import com.ktjy.example.example20To25.dao.impl.PetDaoOracleImpl;
import com.ktjy.example.example20To25.entity.Pet;
import com.ktjy.example.example20To25.service.PetService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service("petService")
public class PetServiceImpl implements PetService {
    //    @Autowired
//    @Resource(name = "PetDaoOracle")
    @Resource(type = PetDaoOracleImpl.class)
    PetDao petDao;

    @Override
    public boolean save(Pet pet) {
        return petDao.insertPet(pet) > 0;
    }
}
